fix(Qwen3-VL-8B): replace deprecated tokenizer arg in SFTTrainer with processing_class and set eos_token in SFTConfig#253
Conversation
…ass and set eos_token
There was a problem hiding this comment.
Code Review
This pull request updates the SFTTrainer configuration across several notebooks and Python scripts by renaming the tokenizer parameter to processing_class and explicitly defining the eos_token in SFTConfig. A significant concern was raised regarding the changes in scripts/model_created_at.csv, where numerous entries have been zeroed out and marked with an error status, suggesting a potential regression or data loss that should be investigated.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c957df738
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Context
While using the Qwen3-VL (8B) Vision notebook to fine-tune Qwen3-VL(8B) on ChartQA, I ran into two issues. I figured I'd
contribute the fixes back.
Reference notebook: https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Qwen3_VL_(8B)-Vision.ipynb
Issues Fixed
1. Deprecated
tokenizerargument inSFTTrainertokenizer = tokenizeris deprecated in newer versions of TRL. The correct argument isprocessing_class = tokenizer, which properly handles vision processors likeQwen3VLProcessor.2. Missing
eos_tokeninSFTConfigWithout explicitly setting
eos_token, TRL falls back to a placeholder<EOS_TOKEN>which doesn't exist inQwen3VLProcessor's vocabulary, causing this error at runtime:ValueError: The specified eos_token ('<EOS_TOKEN>') is not found in the vocabulary of the given processing_class (Qwen3VLProcessor). Ensure that the eos_token exists in the vocabulary before using it as an EOS token.
Fix: pass
eos_token = tokenizer.tokenizer.eos_tokeninSFTConfigto use the inner tokenizer's EOS token.Changes
original_template/Qwen3_VL_(8B)-Vision.ipynb- source fixnb/andpython_scripts/viaupdate_all_notebooks.pyTest Plan